package com.yft.entity.purchasepos;

import com.yft.entity.base.BaseEntity;
import com.yft.entity.posinformation.PosSupplyChannel;
import com.yft.enumeration.PosPurchaseOrderStatus;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**
 * pos机采购订单表头
 */
@Entity
@org.hibernate.annotations.Entity(dynamicUpdate = false, dynamicInsert = true)
@Table(name = "pos_purchase_header")
public class PosPurchaseOrderHeader extends BaseEntity{

    private static final long serialVersionUID = -4893605243335872278L;
    /**
     * 主键
     */
    @Id
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    @Column(length = 50)
	private String headerId;

    /**
     * 入库时间
     */
    @Temporal(TemporalType.TIMESTAMP)
    private Date putInTime;

	/**
	 * 采购订单号
	 */
	@Column(length = 60)
	private String purchaseOrderNo;

    /**
	 * 快递单号
	 */
	@Column(length = 60)
	private String expressNo;

    /**
     * pos进货渠道
     */
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(nullable = false)
    private PosSupplyChannel posSupplyChannel;

    /**
     * 采购单状态
     */
    @Enumerated(EnumType.STRING)
    @Column(length = 40,nullable = false)
    private PosPurchaseOrderStatus posPurchaseOrderStatus;

    /**
     * 进货渠道主键
     */
    @Column(nullable = false)
    private Integer supplyChannelId;

    /**
     * 进货渠道名字
     */
    @Column(length = 40,nullable = false)
    private String channelName;

    /**
     * 通过名称模糊查询
     */
    @Transient
    private String se_purchaseOrderNo;

    public String getHeaderId() {
        return headerId;
    }

    public void setHeaderId(String headerId) {
        this.headerId = headerId;
    }

    public Date getPutInTime() {
        return putInTime;
    }

    public void setPutInTime(Date putInTime) {
        this.putInTime = putInTime;
    }

    public String getPurchaseOrderNo() {
        return purchaseOrderNo;
    }

    public void setPurchaseOrderNo(String purchaseOrderNo) {
        this.purchaseOrderNo = purchaseOrderNo;
    }

    public String getExpressNo() {
        return expressNo;
    }

    public void setExpressNo(String expressNo) {
        this.expressNo = expressNo;
    }

    public PosSupplyChannel getPosSupplyChannel() {
        return posSupplyChannel;
    }

    public void setPosSupplyChannel(PosSupplyChannel posSupplyChannel) {
        this.posSupplyChannel = posSupplyChannel;
    }

    public Integer getSupplyChannelId() {
        return supplyChannelId;
    }

    public void setSupplyChannelId(Integer supplyChannelId) {
        this.supplyChannelId = supplyChannelId;
    }

    public String getChannelName() {
        return channelName;
    }

    public void setChannelName(String channelName) {
        this.channelName = channelName;
    }

    public String getSe_purchaseOrderNo() {
        return se_purchaseOrderNo;
    }

    public void setSe_purchaseOrderNo(String se_purchaseOrderNo) {
        this.se_purchaseOrderNo = se_purchaseOrderNo;
    }

    public PosPurchaseOrderStatus getPosPurchaseOrderStatus() {
        return posPurchaseOrderStatus;
    }

    public void setPosPurchaseOrderStatus(PosPurchaseOrderStatus posPurchaseOrderStatus) {
        this.posPurchaseOrderStatus = posPurchaseOrderStatus;
    }
}